/*
 * Store university related data
 */
package com.spartancoder.accommodation.beans;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author andrei
 */
public class UniversityBean {

	private int universityId;
	private String name,  address;
	private boolean available;

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public boolean isAvailable() {
		return available;
	}

	public void setAvailable(boolean available) {
		this.available = available;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getUniversityId() {
		return universityId;
	}

	public void setUniversityId(int universityId) {
		this.universityId = universityId;
	}

	public void fill(ResultSet rs) throws SQLException {
		universityId = rs.getInt("university_id");
		name = rs.getString("name");
		address = rs.getString("address");
		available = rs.getBoolean("available");
	}
}
